<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN" manifest="/misc/wei_cache_new.manifest">

	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
		<meta name="format-detection" content="telephone=no" />
		<!--<link id="link2" rel="stylesheet" href="${ctxStatic}/member/themes/expand/css/style.css" />-->
		<link id="link1" rel="stylesheet" href="${ctxStatic}/member/themes/expand/css/public.css?v=11" />
		<!--	<link rel="stylesheet" type="text/css" href="${ctxStatic}/member/themes/expand/css/user.css">-->
		<title>慧司蒙</title>
		<script type="text/javascript" src="${ctxStatic}/member/themes/fashion/js/jquery.js">
		</script>

		<script type="text/javascript">
			var flag = 0;

			function fnSubmit() {
				if(flag == 0) {
					flag = 1;
					
					if(confirm('只可兑换一次，您确定兑换码？')){
						return true;
				 	}
					
				}
				return false;
			}
			
			
			
			function duihuanjilu(){
				
				window.location.href="${ctxFront}/expand/duihuanjilu?scoreExchangeId=${scoreExchange.id}&uid=${uid}&wechatId=${wechatId }";
			}
		</script>

		<style type="text/css">
		body{
			font-size: 14px;
		}
			.table {
				border-bottom: 1px #eee solid;
			}
			
			.table-cell {
				border-bottom: 0px #eee solid;
			}
			
			.yhj-img {
				float: left;
				padding: 20px 10px;
			}
			
			.yhj-title {
				padding-top: 36px;
				text-align: left;
				font-size: 18px;
				color: #333;
			}
			
			.yhj-beizhu {
				font-size: 13px;
				color: #666;
				padding-top: 5px;
				padding-bottom: 20px;
			}
			
			.foot {
				position: fixed;
				bottom: 0;
				background: #FFFFFE;
				border-top: 1px #EEEEEE solid;
				width: 100%;
				text-align: center;
			}
			
			.d-section {
				background: orange;
				width: 80px;
				margin-left: 10px;
				font-size: 16px;
				color: #FFFFFE;
				padding: 6px 0;
				text-align: center;
			}
			
			.price {
				clear: both;
				text-align: left;
				padding: 0 0 10px 10px;
				color: #c64850;
				font-size: 16px;
			}
			
			.bg {
				background: url(${ctxStatic}/member/themes/expand/img/dot.png) repeat-x;
				height: 20px;
				background-size: contain;
			}
			.sxanniu {
    cursor: pointer !important;
    margin: 10px auto;
    width: 90%;
    height: 44px;
    line-height: 44px;
    background: #13C7AE;
    color: #fff;
    font-size: 20px;
    text-align: center;
    border-radius: 5px;
    border: 0px;
}
		</style>

	</head>

	<body>
		<div style="padding: 10px; background-color: #13C7AE; font-size: 16px; color: #FFFFFF;">优惠劵详情</div>
		<!--<div class="body">-->
		<section style="background: #FFFFFF; color: #666666;">
			<form id="inputForm" action="${ctxFront}/expand/doExchange" method="post" onsubmit="return fnSubmit();">
				<input type="hidden" name="exchangeId" id="exchangeId" value="${scoreExchange.id }" />
				<input type="hidden" name="uid" id="uid" value="${uid}" />
				<input type="hidden" name="wechatId" value="${wechatId }" />
					<div class="yhj-img">
						<img src="${ctxStatic}/member/themes/expand/img/juan.png" height="90px" />
					</div>
					<div>
						<div class="yhj-title" style="border-bottom: 1px #EEEEEE dashed;">

							${scoreExchange.name }
							<p class="yhj-beizhu" style="padding-bottom: 5px;">${scoreExchange.remarks }&nbsp;</p>
							<p class="yhj-beizhu" style="padding-top: 0;">剩余：${scoreExchange.exchangeNumber }</p>
						</div>
					</div>

				<div class="price">兑换积分：${scoreExchange.score}</div>
				<div class="bg"></div>
				<div style="height: 40px; background: #e3e3e3; text-align: left; font-size: 14px; color: #666; padding-left: 10px;">
					详情  <input style="position:relative;float:right;" class="message-btn" value="兑换列表" type="button" onclick="duihuanjilu()">
				</div>
				<div style="position: relative;">
					<!-- <div class="d-section">
						专享劵
					</div> -->
					
				 <div style="text-align: left; font-size: 13px; padding: 10px; color: #333333; line-height: 20px;">
				 	<%-- <c:if test="${empty exchangeRecordList}">
				 		当前无人兑换<br/>
				 	</c:if>
				 	<c:if test="${not empty exchangeRecordList}">
				 		已有以下用户兑换<br/>
				 	</c:if>
				 	<c:forEach items="${exchangeRecordList}" var="exchangeRecord">
				 		${exchangeRecord.member.name}&emsp;   <fmt:formatDate value="${exchangeRecord.createTime}" type="both" pattern="yyyy-MM-dd HH:mm:ss" /><br/>
				 	</c:forEach> --%>
							 ${scoreExchange.xqing}
					</div>
				</div>
				<div style="height: 50px; background: #FFFFFE;">&nbsp;</div>
				<footer class="foot">
					<c:if test="${duihuan eq 'NO' }">
						<input class="sxanniu" style="background-color: #999;" value="兑换" onclick="alert('您的兑换次数已用完！');" type="button">
					</c:if>
					<c:if test="${duihuan eq 'YES' }">
						<c:if test="${scoreExchange.exchangeNumber == 0}"><input class="sxanniu" style="background-color: #999;" value="兑换" type="button"></c:if>
						<c:if test="${scoreExchange.exchangeNumber > 0}"><input class="sxanniu" value="兑换" type="submit"></c:if>
					</c:if>
				</footer>
			</form>
		</section>

		<!--<div class="backg">
		<div id="city">
    		<p class="backp">礼品详情</p>
		</div>
		<div class="w-product-image">
			<div class="wrapper">
				<img src="${ctxUser }/score/${scoreExchange.showPic }" onerror="this.src='${ctxStatic}/images/zanwutupian.jpg'">
			</div>
		</div>
		
		<div class="segment summary-segment">
			<form id="inputForm" action="${ctxFront}/expand/doExchange" method="post" onsubmit="return fnSubmit();">
				<input	type="hidden" name="exchangeId" id="exchangeId" value="${scoreExchange.id }"/>
				<input	type="hidden" name="uid" id="uid" value="${uid}"/>
				<input	type="hidden" name="wechatId" value="${wechatId }" />
				<div class="title">  </div>
				<div class="jifen">所需积分：</div>
				<div class="jifen">剩余数量：</div>
				<div class="description"></div>
				<div style="text-align:center">
					<c:if test="${duihuan eq 'NO' }">
						<input class="message-btn" style="background-color: #999;" value="兑换" onclick="alert('您的兑换次数已用完！');" type="button">
					</c:if>
					<c:if test="${duihuan eq 'YES' }">
						<c:if test="${scoreExchange.exchangeNumber == 0}"><input class="message-btn" style="background-color: #999;" value="兑换" type="button"></c:if>
						<c:if test="${scoreExchange.exchangeNumber > 0}"><input class="message-btn" value="兑换" type="submit"></c:if>
					</c:if>
				</div>
			
		</div>
    
		<section id="memberInfo" style="margin-bottom: 50px;"></section>
    </div>-->

		<!-- <footer class="footer" style="position: fixed;bottom: 0px;"  onclick="location='http://www.hdzhx.com/me/microengine/index.html#page1'">
		<section class="w-goods" style="  padding-top: 10px;">
			<img src="${ctxStatic}/member/themes/expand/img/me.jpg" width="100px">		
		</section>
	</footer>-->
		<!--</div>-->
	</body>

</html>